<?php
/*
 * 内容手册页面
 * @package    manual
 * @author     Mark
 * @copyright  Copyright (c) 2013 ixdcw team
 * @version    $Id: 86be731de72fbaa1c7f83fb37ac966a9830e4019 $
 */
defined('IN_IXDCW') or exit('Access Denied');
include tpl('header');
show_menu($menus);
?>
<form method="post" action="?" id="dform">
    <input type="hidden" name="moduleid" value="<?php echo $moduleid;?>"/>
    <input type="hidden" name="file" value="<?php echo $file;?>"/>
    <input type="hidden" name="action" value="<?php echo $action;?>"/>
    <input type="hidden" name="itemid" value="<?php echo $itemid;?>"/>
    <input type="hidden" name="forward" value="<?php echo $forward;?>"/>
    <div class="tt"><?php echo $tname;?></div>
    <table cellpadding="2" cellspacing="1" class="tb">
        <tr>
            <td class="tl"><span class="f_red">*</span> 所属分类</td>
            <td><?php echo Post::catTree('post[catid]', $moduleid, '选择分类' ,$catid, 'datatype="n" nullmsg="请选择分类"');?></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_red">*</span> <?php echo $MOD['name'];?>标题</td>
            <td><input name="post[title]" type="text" id="title" size="60" datatype="*2-999" nullmsg="请填写标题" errormsg="最少输入2个字符" value="<?php echo $title;?>"/> <?php echo level_select('post[level]', '级别', $level, 'id="level"');?></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> 标题图片</td>
            <td><?php echo Post::picture($moduleid, 'thumb', 'post[thumb]', $thumb, $MOD['thumb_width'], $MOD['thumb_height']);?></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_red">*</span> <?php echo $MOD['name'];?>内容</td>
            <td><?php echo Post::kindEditor('post[content]', $moduleid, $content, 'datatype="*5-99999" nullmsg="请填写内容" errormsg="内容最少5字"','800px'); ?></td>
        </tr>
        <tr>
            <td class="tl" height="30"><span class="f_hid">*</span> 内容选项</td>
            <td>
                <input type="checkbox" name="post[save_remotepic]" value="1"<?php if ($MOD['save_remotepic']) echo 'checked';?>/>下载远程图片&nbsp;&nbsp;
                <input type="checkbox" name="post[clear_link]" value="1"<?php if ($MOD['clear_link']) echo 'checked';?>/>清除链接&nbsp;&nbsp;
                截取内容 <input name="post[introduce_length]" type="text" size="2" value="<?php echo $MOD['introduce_length']?>"/> 字符至简介&nbsp;&nbsp;
                设置内容第 <input name="post[thumb_no]" type="text" size="2" value=""/> 张图片为标题图
            </td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> <?php echo $MOD['name'];?>简介</td>
            <td><textarea name="post[introduce]" style="width:90%;height:45px;"><?php echo $introduce;?></textarea></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> 关键词(Tag)</td>
            <td><input name="post[tag]" type="text" size="60" value="<?php echo $tag;?>"/><?php tips('多个关键词请用空格隔开');?></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> <?php echo $MOD['name'];?>状态</td>
            <td>
                <input type="radio" name="post[status]" value="3" <?php if ($status == 3) echo 'checked';?> id="status_3"/><label for="status_3"> 通过</label>
                <input type="radio" name="post[status]" value="2" <?php if ($status == 2) echo 'checked';?> id="status_2"/><label for="status_2"> 待审</label>
                <input type="radio" name="post[status]" value="1" <?php if ($status == 1) echo 'checked';?> onclick="if(this.checked) Dd('note').style.display='';" id="status_1"/><label for="status_1"> 拒绝</label>
                <input type="radio" name="post[status]" value="0" <?php if ($status == 0) echo 'checked';?> id="status_0"/><label for="status_0"> 删除</label>
            </td>
        </tr>
        <tr id="note" style="display:<?php echo $status == 1 ? '' : 'none';?>">
            <td class="tl"><span class="f_red">*</span> 拒绝理由</td>
            <td><input name="post[note]" type="text" size="40" value="<?php echo $note;?>"/></td>
        </tr>
        <tr>
            <td class="tl"><span class="f_hid">*</span> 添加时间</td>
            <td><?php echo Post::datetimeBox('post[addtime]', $addtime, 'width:140'); ?></td>
        </tr>
	    <!--
        <tr>
            <td class="tl"><span class="f_hid">*</span> 浏览次数</td>
            <td><input name="post[hits]" type="text" size="10" value="<?php echo $hits;?>"/></td>
        </tr>
        -->
    </table>
    <div class="sbt"><input type="submit" name="submit" value=" 确 定 " class="btn"/>&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" name="reset" value=" 重 置 " class="btn"/></div>
</form>
<script type="text/javascript">
    seajs.use(['$', 'vf', 'vf-css'], function($){
	    $(function(){
		    $('#dform').Validform({
			    beforeCheck:function(curform){
				    lemon.editor.post_content_.sync();
			    }
		    });
	    })
    })
</script>
<script type="text/javascript">Menuon(<?php echo $menuid;?>);</script>
<?php include tpl('footer'); ?>